package com.lili.operate.service.serviceImpl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lili.model.operate.FeedBack;
import com.lili.operate.mapper.FeedbackMapper;
import com.lili.operate.service.FeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class FeedbackServiceImpl implements FeedbackService {

    @Autowired
    FeedbackMapper feedbackMapper;

    @Override
    public Page<FeedBack> queryFeedback(Map map) {
        int current = 1;
        int size = 2;
        if(map.get("current")!=null)
            current = Integer.parseInt(map.get("current").toString());
        if(map.get("size")!=null)
            current = Integer.parseInt(map.get("size").toString());
        Page<FeedBack> page = new Page<>(current,size);
        feedbackMapper.selectPage(page,null);
        return page;
    }
}
